package com.sky.mapper;

import com.sky.entity.Dish;
import com.sky.entity.Setmeal;
import com.sky.entity.SetmealDish;
import com.sky.vo.DishItemVO;
import com.sky.vo.SetmealVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * ClassName: SetmealDishMapper
 * Package: com.sky.mapper
 * Description:
 *
 * @Author 八云
 * @Create 2025/3/20 22:47
 * @Version 1.0
 */
@Mapper
public interface SetmealDishMapper {

    void saveDishes(List<SetmealDish> setmealDishes);

    /**
     * 根据套餐id查询菜品
     * @param setmealId
     */
    List<SetmealDish> getBySetmealIdWithDish(Long setmealId);

    /**
     * 根据套餐分类id查询起售中套餐
     * @param setmeal
     */
    SetmealVO[] getBySetmealId(Setmeal setmeal);

    /**
     * 根据套餐id删除套餐菜品关系
     * @param id
     */
    void deleteBySetmealId(Long id);

    void deleteByDishId(List<Long> ids);

    /**
     * 根据菜品id查询菜品
     * @param id
     */
    DishItemVO[] getByIdWithDishItem(Long id);
}
